// 引入mongoose包
const mongoose = require('mongoose')

// 创建文档结构
const bookSchema = mongoose.Schema({
    name: String,
    author: String,
    price: Number
})

// 创建文档模型并暴露文档模型
module.exports = mongoose.model('books', bookSchema)